﻿@using MiniWeb.Core.Dtos
@using MiniWeb.Core.Entities
@using WFramework.Common
@using WFramework.MvcPager
@{
    Layout = "~/Views/Shared/_BaseLayout.cshtml";

    var classlist = ViewData["classlist"] as List<ProductsClass>;

    var typeinfo = ViewData["typeinfo"] as ProductsType;
    var classinfo = ViewData["classinfo"] as ProductsClass;
    int i = 1;
}
@model PagedList<ProductsInfoDto>
<div class="lump-top area">
    <div class="q-nav">
        全部结果 &gt; <a href="/goods/list">所有商品</a>
        @if (typeinfo != null)
        {
            <text>&gt;<a href="/goods/list?rid=@typeinfo.ID">@typeinfo.TypeName</a></text>
        }
        @if (classinfo != null)
        {
           <text> &gt;<a href="/goods/list?cid=@classinfo.ID">@classinfo.ClassName</a></text>
        }
        </div>
    <div class="q-search">
    </div>
</div>
<div class="sub-box">
    <div class="area">
        <div class="lump-content clear">
         @Html.Action("LeftClum", "MainLayout")
            <!--left-->
         <div class="right-column">
            
            <h1 class="main_tit" style="height: 50px; line-height: 50px;">
                站内搜索<strong>Search</strong> <i>搜索关健字： <b class="blue">@ViewBag.KeyWord</b> ，共有 <b class="red">
                    @Model.TotalItemCount</b> 条记录</i>
            </h1>
            <div class="bd-1 red-line mgbt-10">
            	<ul class="sub-product j-li-hover clear">
                    
                   @foreach (var item in Model)
                   {
                        <li class="">
                                <div class="u-box hover">
                                    <a class="u-img" href="/goods/show?pid=@item.ID">
                                        <img src="@item.ProductImg" alt=""></a> <a class="u-name" href="/goods/show?pid=@item.ID">@item.ProductName</a>
                                    <div class="m-pri">
                                        价格：<b>￥@item.Price</b>
                                        <p class="add">
                                           @if (item.Price != item.CPrice)
                                           {
                                               <i>直降</i>
                                           }
                                                @if (item.CreateDate.AddDays(5) > DateTime.Now)
                                                {<i> </i>
                                                <text>新品</text>
                                                }@if (item.SellNum > 10)
                                                 {<i> </i>
                                                          <text>热卖</text>
                                                 }
                                        </p>
                                    </div>
                                    @if (item.Price != item.CPrice)
                                    {
                                         <div class="u-pri2">
                                        ￥@item.CPrice</div>
                                    }
                                    @* <p class="m-star" title="4"><!--这里的title就是好评星星的百分比,20就是20%的意思-->
                                <span class="star-white clear">
                                    <span class="star-yellow" style="width: 3.04px;"></span>
                                </span>
                                <a>(已有0人评价)</a>
                            </p>*@
                                </div>
                            </li>
                   }
                </ul>
                <div class="m-page m-page-rt">
                    
                </div><!--5-->
            </div><!--bd-1-->
        </div>
            <!--right-->
        </div>
        <!--lump-content-->
        <link href="/templates/speciality/css/pro.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="/templates/speciality/js/global-ko.js"></script>
        @Html.Action("SeeHistoryAndLove", "MainLayout")
    </div>
</div>
